package com.lmc.forum.services;

import com.lmc.forum.model.Article;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface IArticleService {

    @Transactional
    void insertSelective(Article row);

    List<Article> selectAll();

    List<Article> selectByBoardId (Long boardId);

    Article selectDetailByArticleId(Long id);

    void modify(Long id, String title, String content);

    Article selectById(Long id);

    void thumbsUpById (Long id);

    @Transactional // 事务管理
    void deleteById (Long id);

    /**
     * 根据⽤⼾Id查询帖⼦列表以发布时间降序排列
     * @param userId ⽤⼾Id
     * @return ⽤⼾发布的帖⼦集合
     */
    List<Article> selectByUserId (Long userId);

}
